package com.homework;
import javax.json.bind.annotation.*;

@SuppressWarnings({"unused", "WeakerAccess"})
public class StudentDTO {

    private int id;
    // 姓名
    @JsonbProperty("姓名")
    private String stuName;
    // 学号
    @JsonbProperty("学号")
    private String stuNumber;
    // 年龄
    @JsonbProperty("年龄")
    private int stuAge;
    // 性别
    @JsonbProperty("性别")
    private String stuSex;
    // 邮箱
    @JsonbProperty(value = "邮箱", nillable = true)
    private String stuEmail;
    // 住址
    @JsonbProperty("住址")
    private String stuAddress;


    // 为了使用jsonb,必须有一个空的默认构造方法
    public StudentDTO() {

    }

    public StudentDTO(String stuName, String stuNumber, String identity, int stuAge, String stuSex, String stuEmail,String stuAddress) {
        this.stuName = stuName;
        this.stuNumber = stuNumber;
        this.stuAge = stuAge;
        this.stuSex = stuSex;
        this.stuEmail = stuEmail;
        this.stuAddress = stuAddress;

    }

    @JsonbNumberFormat(locale = "en_US", value = "#0.0")

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public String getStuNumber() {
        return stuNumber;
    }

    public void setStuNumber(String stuNumber) {
        this.stuNumber = stuNumber;
    }

    public String getStuSex() {
        return stuSex;
    }

    public void setStuSex(String stuSex) {
        this.stuSex = stuSex;
    }

    public String getStuEmail() {
        return stuEmail;
    }

    public void setStuEmail(String stuEmail) {
        this.stuEmail = stuEmail;
    }

    public String getStuAddress() {
        return stuAddress;
    }

    public void setStuAddress(String stuAddress) {
        this.stuAddress = stuAddress;
    }

    public int getStuAge() {
        return stuAge;
    }

    public void setStuAge(int stuAge) {
        this.stuAge = stuAge;
    }
}